package com.alm.token.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.alm.token.MyApp;
import com.alm.token.R;
import com.alm.token.base.BaseActivity;
import com.alm.token.ui.persenter.MyPreenter;
import com.alm.token.utils.ActionBarHelper;
import com.alm.token.utils.EmptyUtils;

import org.greenrobot.eventbus.EventBus;

import baibeiwallet.event.RefreshMeEvent;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class TurnOutBiTBActivity extends BaseActivity {


    @BindView(R.id.img_itme_fukuanzhuanzhang)
    ImageView imgItmeFukuanzhuanzhang;
    @BindView(R.id.img_itme_shoukuanma)
    ImageView imgItmeShoukuanma;

    @Override
    protected MyPreenter initPreenter() {
        return null;
    }

    @Override
    protected int getContentViewId() {

        return R.layout.activity_turnout_bitb;
    }

    @Override
    protected void initVariables() {

    }

    @Override
    protected void initViews() {
//        new ActionBarHelper(this).setTitle(getString(R.string.app_hint_superegg));
        new ActionBarHelper(this).setTitle(getString(R.string.tv_hint_shoufukuan));

    }

    @Override
    protected void loadData() {

    }

    @Override
    public void onClick(View view) {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.img_itme_fukuanzhuanzhang, R.id.img_itme_shoukuanma})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.img_itme_fukuanzhuanzhang:
                startActivity(TurnOutBiTB_shoukuanren_Activity.class);
                break;
            case R.id.img_itme_shoukuanma:
                if(EmptyUtils.isEmpty(MyApp.getUserData())||EmptyUtils.isEmpty(MyApp.getUserData().getData())||EmptyUtils.isEmpty(MyApp.getUserData().getData().getUser())){
                    EventBus.getDefault().post(new RefreshMeEvent(1));
                    showToast(getString(R.string.common_loading));
                    break;
                }
                startActivity(TurnOutBiTB_ShoukuanActivity.class);
                break;
        }
    }
}
